# Copyright (C) 2006  Stephane Alnet
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 

#
# For more information visit http://carrierclass.net/
#

use strict;
use warnings;

package CCNCore::Model::Systems;

use Jifty::DBI::Schema;

use CCNCore::Record schema {

    column dns_name =>
        type is 'text',
        is mandatory,
        is unique,
        since '0.0.1',
        label is 'DNS name',
        hints is 'The name of this system in the DNS.';

    column salt =>
        type is 'text',
        is mandatory,
        since '0.0.1',
        label is 'Salt',
        hints is 'A random text used by server within this system to verify they belong to the same system.';

    column timezone =>
        type is 'text',
        is mandatory,
        since '0.0.1',
        label is 'Timezone',
        hints is 'The management timezone configured on the servers in this system.';

    column public_ntp =>
        type is 'text',
        since '0.0.1',
        label is 'Public NTP servers',
        hints is 'A blank- or comma-delimited list of public Time server';

    column manager =>
        references CCNCore::Model::Server,
        is mandatory,
        is immutable,
        since '0.0.1',
        label is 'Manager server',
        hints is 'The manager server for this system. Among other things, the manager server is the only one granted direct SSH access into all the servers in the system.';

};

use CCNCore::Mixin::Active;
use CCNCore::Mixin::FancyName;
use CCNCore::Mixin::Owner;

sub since { 0.0.1 }
sub menu { 'Systems' }

1;
